package cn.asm;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;

import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author fanhb on 2020/12/11
 * @desc xxxx
 */
public class Hello {


    public static void main(String[] args) {

        System.out.println(HelloAsm.class.getName());

//        ClassReader classReader = new ClassReader(orgBytes);
//        ClassWriter classWriter = new ClassWriter(classReader, ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
//        byte[] bytes = classWriter.toByteArray();
//        ClassVisitor cv = new MyClassVisitor(classWriter);
//        classReader.accept(cv, 0);
//
//        //将二进制流写到本地磁盘上
//        FileOutputStream fos = null;
//        try {
//            fos = new FileOutputStream("HelloAsm.class");
//            fos.write(bytes);
//            fos.close();
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
    }


}
